﻿using System;

namespace Duo1JHttpServer.Framework.Server
{
    internal class ConsoleHandler
    {
        public void InputHandler()
        {
            while (WebMain.running)
            {
                string readLine = Console.ReadLine()?.ToLower();
                if (readLine == null || "".Equals(readLine))
                {
                    continue;
                }

                switch (readLine)
                {
                    //退出
                    case "exit":
                        WebMain.Close();
                        break;
                    //退出
                    case "close":
                        WebMain.Close();
                        break;
                }
            }
        }
    }
}